/**
 * Created by liujie on 2017/12/9.
 */
;(function ($) {
    var secondMenus = window.sessionStorage.getItem("chidlMenus");
    if(secondMenus){
        secondMenus = JSON.parse(secondMenus);
        if(secondMenus.length){
            for(var k=0;k<secondMenus.length;k++){
                var parentId = secondMenus[k]["parentId"];
                var itemId = secondMenus[k]["id"];
                $("[op_resId='"+parentId+"_"+itemId+"']:hidden").removeClass("dp-none");
            }
            $("[op_resId]:hidden").remove();
        }
    }
})(jQuery);
var AuthUtils = function ($) {
    function _getOpAuthById(opResId) {
        var secondMenus = window.sessionStorage.getItem("chidlMenus");
        if(secondMenus){
            secondMenus = JSON.parse(secondMenus);
            if(secondMenus.length){
                for(var k=0;k<secondMenus.length;k++){
                    var parentId = secondMenus[k]["parentId"];
                    var itemId = secondMenus[k]["id"];
                    var _op_resId = parentId+"_"+itemId;
                    if(_op_resId === opResId){
                        return true;
                    }
                }
            }
        }
        return false;
    }
    
    return {
        getOpAuthById:function (opResId) {
            return _getOpAuthById(opResId)
        }
    }
}(jQuery);